<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: silence
  Date: 17-6-4
  Time: 下午7:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>编辑页面</title>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Bootstrap core CSS -->
    <link href="<c:url value="/resources/lib/bootstrap/css/bootstrap.min.css"/>" rel="stylesheet">

</head>
<body>

<div class="container">

    <h1 class="text-center">编辑</h1>

    <h2><a class="btn btn-primary" href="<c:url value="/home"/>">放弃修改 回到首页</a></h2>

    <form:form commandName="bill" action="/bill/${bill.id}" method="post">
        <p>
            <label for="title">标题</label>
            <form:input path="title" id="title" maxlength="30" autofouces="autofouces" required="true" cssClass="form-control"/>
        </p>
        <p>
            <label for="type">收支</label><form:select path="type.id" id="type" cssClass="form-control"
                                                     items="${billType}" itemLabel="name" itemValue="id"/>
        </p>
        <p>
            <label for="money">金额</label>
            <form:input path="money" cssClass="form-control" type="number" id="money" step="0.01" required="true"/>

        </p>
        <p>
            <label for="introduce">描述</label>
            <form:input path="introduce" cssClass="form-control" id="introduce" alt="描述"/>

        </p>
        <p>
            <label for="createDate">时间</label>
            <form:input path="createDate" cssClass="form-control" id="createDate" type="date" required="true" alt="注意是金额产生时间"/>

        </p>
        <p>
            <button class="btn btn-block btn-primary" type="submit">修改</button>
        </p>
    </form:form>

</div>

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="<c:url value="/resources/lib/jquery/jquery.min.js"/>"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="<c:url value="/resources/lib/bootstrap/js/bootstrap.min.js"/>"></script>

</body>
</html>
